<?
if(empty($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest')
{
	exit;
}
if(!isset($_POST['path'],$_POST['repos']))
{
	exit;
}
include_once('includes/class.tokkotai.php');
$_tok = new tokkotai;
header('content-type: application/json');
echo json_encode($_tok->lookup_dir($_POST['repos'],$_POST['path']));
?>
